package com.woniu.command.workingProcedureCommand;

import com.woniu.command.Command;
import com.woniu.command.handler.WorkingProcedureCommandHandler;
import com.woniu.utils.ApplicationContextHolder;

public class DeleteWorkingProcedureCommand implements Command<Long,Integer> {

    private WorkingProcedureCommandHandler handler;
    public DeleteWorkingProcedureCommand(){
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(WorkingProcedureCommandHandler.class);
    }
    @Override
    public Integer  execute(Long id) {
        return handler.deleteWorkingProcedureById(id);
    }
}
